﻿<!--
// *************************************************************************************************
// Project: RealSenseLight
// File: SpeechSynthesizerView.xaml  Author: Peter O'Hanlon
// Copyright © Peter O'Hanlon 2014-2015
// Date: 2015, 1, 6, 21:29
// *************************************************************************************************
-->
<UserControl x:Class="RealSenseLight.Views.SpeechSynthesizerView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:rs="http://schemas.realsense.com/sdk/"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="80" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <TextBox Text="{Binding Text}" Grid.Row="0" Grid.ColumnSpan="2">
            <i:Interaction.Behaviors>
                <rs:SpeechSynthesizerBehavior 
                    SayText="{Binding Text}" 
                    Pitch="{Binding Pitch}"
                    SpeechRate="{Binding Rate}"
                    Volume="{Binding Volume}"/>
            </i:Interaction.Behaviors>
        </TextBox>
        <TextBlock Text="Pitch" Grid.Row="1" />
        <Slider Minimum="50" Maximum="200" Value="{Binding Pitch}" Grid.Column="1" Grid.Row="1" />
        <TextBlock Text="Speech Rate" Grid.Row="2" />
        <Slider Minimum="50" Maximum="400" Value="{Binding Rate}" Grid.Column="1" Grid.Row="2" />
        <TextBlock Text="Volumne" Grid.Row="3" />
        <Slider Minimum="0" Maximum="100" Value="{Binding Volume}" Grid.Column="1" Grid.Row="3" />
    </Grid>
</UserControl>
